package com.ficv.tucanalmovil;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.net.MalformedURLException;
import java.net.URL;
import java.net.URLEncoder;

import android.util.Log;

public class Utils {

	public static  String getUrlContent(String url)
			throws MalformedURLException, IOException {
		
		StringBuffer result = new StringBuffer();
		
		Log.i("Utils", "url: " + url);

		 
		URL msgurl = new URL(url);
		BufferedReader in = new BufferedReader(
		            new InputStreamReader(
		            msgurl.openStream()));

		String inputLine;

		while ((inputLine = in.readLine()) != null) {
		   Log.i("Utils", inputLine);
		    result.append(inputLine);
		}    
		
		in.close();
		
		return result.toString();
	}
	
}
